package com.neusoft.elmboot.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.neusoft.elmboot.po.WalletRules;

@Mapper
public interface WalletRulesMapper {

	@Insert("insert into walletrules values(#{type},#{everpay},#{give},#{discount},#{interest})")
	public int saveRule(WalletRules walletRules);
	
	@Update("update walletrules set everpay=#{everpay},give=#{give},discount=#{discount},interest=#{interest} where type=#{type}")
	public int changeRule(WalletRules walletRules);
	
	@Select("select * from walletrules where type=#{type}")
	public WalletRules getRulesBytype(int type);
}